// import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/home/Home'
import My from "../components/infor/My.vue"
import record from "../components/infor/record.vue"
import articleDetail from "../components/infor/articleDetail.vue"
import recordDetail from "../components/infor/recordDetail.vue"
import blank from "../components/infor/blank.vue"
import TreeChart from '../components/infor/TreeChart.vue'
// import recordDetai from '../components/infor/recordDetai.vue'
// import myShare from '../components/infor/myShare.vue'
// import util from '../components/infor/util.vue'
// import setting from '../components/infor/setting.vue'
// import upload from '../components/infor/upload.vue'

// Vue.use(Router)

export default new Router({
  base: '/VueTest',
  routes: [
    {
      path: '/',
      name: 'home',
      component: Home,
      meta: {
        title: '首页'
      }
    },
    {
      path: '/home',
      name: 'home',
      component: Home,
      meta: {
        title: '首页'
      }
    },
    {
      path:'/my',
      name: 'my',
      component: My,
      meta: {
        title: '我的'
      }
    },
    {
      path:'/record',
      name: 'record',
      component: record,
      meta: {
        title: '记录'
      }
    },
    {
      path:'/articleDetail',
      name: 'articleDetail',
      component: articleDetail,
      meta: {
        title: '文章详情'
      }
    },
    {
      path:'/myData',
      name: 'myData',
      component: resolve => require(['@/components/infor/myData'], resolve) ,
      meta: {
        title: '我的数据'
      }
    },
    {
      path:'/myShare',
      name: 'myShare',
      component: resolve => require(['@/components/infor/myShare'], resolve) ,
      meta: {
        title: '我的分享'
      }
    },
    {
      path:'/util',
      name: 'util',
      component: resolve => require(['@/components/infor/util'], resolve) ,
      meta: {
        title: '使用攻略'
      }
    },
    {
      path:'/setting',
      name: 'setting',
      component: resolve => require(['@/components/infor/setting'], resolve) ,
      meta: {
        title: '设置中心'
      }
    },
    {
      path:'/upload',
      name: 'upload',
      component: resolve => require(['@/components/infor/upload'], resolve) ,
      meta: {
        title: '上传文章'
      }
    },
    {
      path:'/recordDetail',
      name: 'recordDetail',
      component: recordDetail,
      meta: {
        title: '记录详情'
      }
    },
    {
      path:'/blank',
      name: 'blank',
      component: blank,
      meta: {
        title: '记录详情'
      }
    },
    {
      path: '/TreeChart',
      name: 'TreeChart',
      component: TreeChart
    },
  ]
})
